package com.uzai.console.web.fd;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.uzai.console.dto.fd.fdfollowgroup.FdFollowGroupIdDto;
import com.uzai.console.dto.fd.fdfollowgroup.FdFollowGroupMsgQuery;
import com.uzai.console.dto.fd.fdfollowgroup.FdFollowGroupQuery;
import com.uzai.console.service.fd.FdFollowGroupService;
import com.uzai.console.vo.fd.fdfollowgroup.FdFollowGroupVo;
import com.uzai.console.vo.fd.fdfollowgroup.FdFollowGroupMsgVo;
import com.uzai.console.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 发单采集群
 * @author liuqi
 * @date 2021年08月16日 15:11
 */
@Api(value = "采集群",tags = "个人微信|发单|采集群")
@ApiSort(104)
@RestController
public class FdFollowGroupController extends BaseController {
    private Logger logger = LoggerFactory.getLogger(FdFollowGroupController.class);

    @Autowired
    private FdFollowGroupService fdFollowGroupService;

    @ApiOperation(value = "分页查询发单采集群列表", notes = "分页查询发单采集群列表", response = FdFollowGroupVo.class)
    @ApiOperationSupport(order = 1)
    @PostMapping("/fdFollowGroup/findFdFollowGroupList")
    public Object findFdFollowGroupList(@RequestBody FdFollowGroupQuery fdFollowGroupQuery){
        fdFollowGroupQuery.setStatus(1);
        return fdFollowGroupService.findFdFollowGroupList(fdFollowGroupQuery);
    }

    @ApiOperation(value = "查询发单采集群详情", notes = "查询发单采集群详情", response = FdFollowGroupVo.class)
    @ApiOperationSupport(order = 2)
    @PostMapping("/fdFollowGroup/findFdFollowGroup")
    public Object findFdFollowGroup(@RequestBody FdFollowGroupIdDto fdFollowGroupIdDto){
        return fdFollowGroupService.findFdFollowGroup(fdFollowGroupIdDto);
    }

    @ApiOperation(value = "官方采集群消息预览", notes = "官方采集群消息预览", response = FdFollowGroupMsgVo.class)
    @ApiOperationSupport(order = 3)
    @PostMapping("/fdFollowGroup/findMsgList")
    public Object findFdFollowGroupMsgList(@RequestBody FdFollowGroupMsgQuery fdFollowGroupMsgQuery){
        return fdFollowGroupService.findFdFollowGroupMsgList(fdFollowGroupMsgQuery);
    }


}
